﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ThoiTrang.Business;
using ThoiTrang.Entities;

public partial class user_favimg : System.Web.UI.Page
{
    public a_AlbumCollection albums;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!SessionManager.IsLogged)
            Response.Redirect("login.aspx?ckid=" + SessionManager.GetCookie(), true);
        albums = a_AlbumService.Geta_AlbumListBySSID(SessionManager.GetCookie(), a_AlbumColumns.Name, ThoiTrang.Data.OrderDirection.ASC);
    }
    public int CountImg(int abId)
    {
        a_FavoriteCollection favs = a_FavoriteService.Geta_FavoriteListByAlbumID(abId, a_FavoriteColumns.ID, ThoiTrang.Data.OrderDirection.ASC);
        return favs==null?0:favs.Count;
    }
}
